{% extends 'web_template/default_two/templates/base.html' %}
{% block keywords %}
    {{ public.system.web_name }}-{{ public.system.web_subtitle }},{{ public.system.web_key }}
{% endblock %}
{% block description %}{{ public.system.web_description }}{% endblock %}
{% block title %}
{{ public.system.web_name or '欢迎使用tlcms管理系统' }}-{{ public.system.web_subtitle }},{{ public.system.web_key }}
{% endblock %}
{% block content %}
    <div class="banner">
        <div class="swiper-container swiper-container-horizontal">
            <div class="swiper-wrapper" style="transform: translate3d(-690px, 0px, 0px); transition-duration: 0ms;">
                {% for foo in public.lantern[:20] %}
                <div class="swiper-slide ">
                    <a href="{{ url_for('webapp_bp.article_page',uid=foo.ID) }}" target="_blank">
                        <img src="{{ foo.imgUrl }}" alt="{{ foo.title }}"><span>{{ foo.title }}</span>
                    </a>
                </div>
                {% endfor %}
            </div>
            <div class="swiper-pagination swiper-pagination-clickable swiper-pagination-bullets">
                <span class="swiper-pagination-bullet"></span>
                <span class="swiper-pagination-bullet swiper-pagination-bullet-active"></span>
            </div>
            <div class="swiper-button-next swiper-button-disabled"></div>
            <div class="swiper-button-prev"></div>
        </div>
    </div>
    <ul class="news_list">
    {% for foo in public.topNew.data[:10] %}
        <li><a href="{{ url_for('webapp_bp.article_page',uid=foo.ID) }}" title="{{ foo.title }}" target="_blank"><i><img src="{{ foo.imgUrl }}" alt="{{ foo.title }}"></i>
            <h2>{{ foo.title }}</h2>
        </a>
            <p class="news_list_info">{{ foo.description[:60] }}{% if foo.description|length>60 %}...{% endif %}</p>
            <p class="news_list_time"><span><a href="{{ url_for('webapp_bp.list_article_page',cid=foo.PID_ID) }}" target="_blank">{{ foo.PID }}</a></span><span>时间：{{ foo.update_time }}</span><span>点击：{{ foo.clicks }}</span><span>作者：{{ foo.author }}</span></p>
        </li>
    {% endfor %}
    </ul>

{% endblock %}
{% block links %}
<section>
            <h2>友情链接</h2>
            <ul class="links">
                {% for foo in public.blogroll %}
                <li>
                    <a href="{{ foo.link_url }}" target="_blank" title="{{ foo.link_name }}" style="color: {{ foo.link_color }}" rel="nofollow">{{ foo.link_name }}
                    </a>
                </li>
            {% endfor %}
            </ul>
        </section>
{% endblock %}
